package com.itheima.mapper;

import com.itheima.bean.Student;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

public interface StudentMapper {
    //查询
    @Select("select * from student")
    public abstract List<Student> selectAll();
    //添加
    @Insert("Insert into student values(#{number},#{name},#{birthday},#{address})")
    public abstract int addStu(Student student);
    //修改
    @Update("update student set name=#{name},birthday=#{birthday},address=#{address} where number =#{number}")
    public abstract  int updaptStu(Student student);
    //删除
    @Delete("delete from student where number=#{number}")
    public  abstract int deleteStu(String number);
}
